package com.hyt.it.ogt.kq.service.gov.model.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author Chengxh
 * @since 2021-08-14
 */
@Data
@Accessors(chain = true)
@ApiModel(value="TimeParam对象", description="批次参数对象")
public class TimeParam {

    @ApiModelProperty(value = "批次id(新增时不传，编辑时必传)")
    private String timeId;

    @NotBlank(message = "考试任务id不能为空")
    @ApiModelProperty(value = "考试任务id")
    private String taskId;

    @NotBlank(message = "批次名称不能为空")
    @Length(max = 20, message = "批次名称长度最多支持20个字")
    @ApiModelProperty(value = "批次名称")
    private String name;

    //@NotNull(message = "开始时间不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime startTime;

    //@NotNull(message = "结束时间不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss"  ,timezone="GMT+8")
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endTime;

    //@NotNull(message = "多科目混编在一个考场不能为空")
    @ApiModelProperty(value = "多科目混编在一个考场，true：开，false：关")
    private Boolean roomMix = Boolean.TRUE;

    //@NotEmpty(message = "科目id不能为空")
    @ApiModelProperty(value = "科目id")
    private String subjectIds;

}
